package com.huonan.jb.tools;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class EmojiMatcher {
    public static void main(String[] args) {
        String text = "Hello World 😀👋 🤮 🏡祭奠玫 méi🌹";
        String regex = "\\p{So}\\p{Sk}{0,255}"; // Unicode范围
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(text);
        while (matcher.find()) {
            System.out.println(matcher.group());
        }
    }
}
